#ifndef PS_SLIDER_H
#define PS_SLIDER_H

#include "slider.h"
#include "../../anime/utils.h"

class PSSlider: public Slider
{
public:
    PSSlider( Widget* _parent, Engine* _engine, int _x, int _y, int _w, int _h,
              const QColor& _minColor = QColor( 255, 0, 0, 100 ),
              const QColor& _maxColor = QColor( 255, 255, 0, 100 ),
              const QColor& _ballColor = QColor( 255, 0, 0, 150 ) );
    ~PSSlider();

    void Highlight( double startPos, double endPos );

    void SetHighlightPoints( QList< double >& highlightPos );

    virtual void Paint( QPainter &painter );

    bool showBall;
    bool showCursors;

protected:
    QBrush* highlightBrush;

    double cursorMin;
    double cursorMax;
    QList< double > highlights;

    int h22;
    int tmpSquare;

    QPainterPath cursorPath;

    Property< double >* minCursorProperty;
    Property< double >* maxCursorProperty;
    ScalarInterpolator< int, double, double >* i1;
    ScalarInterpolator< int, double, double >* i2;
    Power_NI< double >* p_ni;
    Animation* highlightAnime;
};

#endif // PS_SLIDER_H
